package org.browntooth.app.bluetooth.messaging;

import java.util.ArrayList;

import org.browntooth.app.bluetooth.BluetoothDeviceConnection;

public class AsyncBluetoothMessagingDeviceConnection {
	private final BluetoothDeviceConnection connection;
	private final SendingThread sendingThread;
	private final RecievingTrhead recievingTrhead;

	public AsyncBluetoothMessagingDeviceConnection(BluetoothDeviceConnection connection) {
		this.connection = connection;

		sendingThread = new SendingThread();
		recievingTrhead = new RecievingTrhead();

		sendingThread.start();
		recievingTrhead.start();
	}

	public BluetoothDeviceConnection getConnection() {
		return connection;
	}

	public void sendMessage(BluetoothMessage message) {
		sendingThread.send(message);
	}

	private class SendingThread extends Thread {
		private final ArrayList<BluetoothMessage> pendingMessages;
		
		private SendingThread() {
			pendingMessages = new ArrayList<BluetoothMessage>();
		}

		public void send(BluetoothMessage message) {
			//PendingMessages
		}
		
		@Override
		public void run() {

		}
	}

	private class RecievingTrhead extends Thread {
		private RecievingTrhead() {

		}

		@Override
		public void run() {

		}
	}
}
